<?php

namespace App\Http\Services;

/*用户service层*/
use App\Http\Model\Config;

class DishServices extends CommonServices
{
    private $config_model;


    public function __construct()
    {
        $this->config_model = new Config();
    }

    /*
     * 获取配置
     * */
    public function getConfig($type = '')
    {
        return $this->config_model->configCache($type);
    }

    public function checkConfigDate($config_date,$timestamp)
    {
        $config_date = explode(' - ', $config_date['value']);
        $timestamp = date('Y-m-d H:i:s',$timestamp);
        if ($timestamp > $config_date[1] || $timestamp < $config_date[0]) {
            return false;
        }
        return true;
    }


}
